package main.com.dhj.test01

object test05 {
    def main(args: Array[String]): Unit = {
        val obj1 = new Dog();

        obj1.spark();
        obj1.move();

    }

    private trait Animal {
        def spark(): Unit;
        def move(): Unit = println("move");
        val legs: Int = 4;
        val age: Int;
    }

    private class Dog extends Animal {
        override def spark(): Unit = println("wang wang wang");
        override val age: Int = 10;
        override def move(): Unit = println("move move move");
    }

}
